home *** CD-ROM | disk | FTP | other *** search
/ Best of www.BestZips.com (Collector's Edition) / Best of WWW.BESTZIPS.COM Collector's Edition (JCSM Shareware) (JCS Marketing).ISO / prgtools / enigma31.zip / samples.zi_ / samples.zi / Level3.frm < prev    next >
Text File  |  1996-09-06  |  4KB  |  201 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Level Three"
  4.    ClientHeight    =   2685
  5.    ClientLeft      =   3645
  6.    ClientTop       =   2730
  7.    ClientWidth     =   3645
  8.    Height          =   3090
  9.    Left            =   3585
  10.    LinkTopic       =   "Form1"
  11.    LockControls    =   -1  'True
  12.    ScaleHeight     =   2685
  13.    ScaleWidth      =   3645
  14.    Top             =   2385
  15.    Width           =   3765
  16.    Begin VB.TextBox txtKickOut 
  17.       Height          =   315
  18.       Left            =   120
  19.       TabIndex        =   5
  20.       Top             =   1770
  21.       Width           =   735
  22.    End
  23.    Begin VB.CommandButton Command3 
  24.       Caption         =   "E&xit"
  25.       Height          =   405
  26.       Left            =   2490
  27.       TabIndex        =   4
  28.       Top             =   2190
  29.       Width           =   1065
  30.    End
  31.    Begin VB.CommandButton Command2 
  32.       Caption         =   "&Continue"
  33.       Height          =   405
  34.       Left            =   1290
  35.       TabIndex        =   3
  36.       Top             =   2190
  37.       Width           =   1065
  38.    End
  39.    Begin VB.CommandButton Command1 
  40.       Caption         =   "&Register"
  41.       Enabled         =   0   'False
  42.       Height          =   405
  43.       Left            =   120
  44.       TabIndex        =   2
  45.       Top             =   2190
  46.       Width           =   1065
  47.    End
  48.    Begin VB.TextBox Text2 
  49.       Height          =   315
  50.       Left            =   930
  51.       MultiLine       =   -1  'True
  52.       TabIndex        =   1
  53.       Top             =   1770
  54.       Width           =   2565
  55.    End
  56.    Begin VB.TextBox Text1 
  57.       Height          =   1575
  58.       Left            =   120
  59.       MultiLine       =   -1  'True
  60.       TabIndex        =   0
  61.       Top             =   90
  62.       Width           =   3405
  63.    End
  64. End
  65. Attribute VB_Name = "Form1"
  66. Attribute VB_Creatable = False
  67. Attribute VB_Exposed = False
  68. Option Explicit
  69.  
  70. Private Sub Command1_Click()
  71.  
  72. Dim stext1 As String
  73. Dim stext2 As Variant
  74.  
  75. stext1 = Text1.Text
  76. stext2 = Text2.Text
  77.  
  78.     If Jumbler(stext1, stext2) = False Then
  79.     
  80.         MsgBox "Registration Information Is Invalid", 48, "Shareware"
  81.     
  82.         Text1.Text = ""
  83.         Text2.Text = ""
  84.         txtKickOut = ""
  85.         Text1.SetFocus
  86.         
  87.     Else
  88.     
  89.         MsgBox "Thank You, Registration Accepted", , "Shareware"
  90.         
  91.             WriteIt stext1, stext2
  92.             benable = True
  93.             Unload Me
  94.             
  95.             Form2.Show
  96.         
  97.     End If
  98.  
  99. End Sub
  100.  
  101. Private Sub Command2_Click()
  102.         
  103.         Unload Me
  104.         Form2.Caption = Form1.Caption
  105.         Form2.Show
  106.         
  107. End Sub
  108.  
  109. Private Sub Command3_Click()
  110.         
  111.         End
  112.         
  113. End Sub
  114.  
  115. Private Sub Form_Load()
  116.         
  117.         Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
  118.        
  119.        
  120. End Sub
  121.  
  122. Private Sub Text1_Change()
  123.         
  124.         EnableButtons
  125.         
  126. End Sub
  127.  
  128. Private Sub Text2_Change()
  129.         
  130.         EnableButtons
  131.         
  132. End Sub
  133.  
  134. Private Sub EnableButtons()
  135.  
  136.     If Text1.Text > "" And Text2.Text > "" And txtKickOut.Text > "" Then
  137.     
  138.         Command1.Enabled = True
  139.         
  140.     Else
  141.     
  142.         Command1.Enabled = False
  143.         
  144.     End If
  145.     
  146. End Sub
  147.  
  148. Private Sub Text2_GotFocus()
  149.         
  150.         If txtKickOut.Text = "" Then
  151.         
  152.             txtKickOut.SetFocus
  153.             
  154.         End If
  155. End Sub
  156.  
  157. Private Sub Text3_Change()
  158.         
  159.         
  160. End Sub
  161. Private Sub Text2_KeyPress(KeyAscii As Integer)
  162.         
  163.         If KeyAscii = 13 Then
  164.         
  165.             Command1_Click
  166.             
  167.         End If
  168. End Sub
  169.  
  170. Private Sub txtKickOut_Change()
  171.         
  172.         Dim LenText As Integer
  173.         
  174.            LenText = Len(txtKickOut.Text)
  175.            
  176.            If LenText = 3 Then
  177.             
  178.                 If Kickout(txtKickOut.Text) = False Then
  179.                 
  180.                     txtKickOut.Text = ""
  181.                     txtKickOut.SetFocus
  182.                     
  183.                 Else
  184.                 
  185.                     Text2.SetFocus
  186.                     
  187.                 End If
  188.                 End If
  189.                 
  190.         EnableButtons
  191. End Sub
  192.  
  193. Private Sub txtKickOut_GotFocus()
  194.         
  195.         If Text1.Text = "" Then
  196.  
  197.             Text1.SetFocus
  198.     
  199.         End If
  200. End Sub
  201.